﻿<Window x:Class="IntensityChart.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d3="http://research.microsoft.com/DynamicDataDisplay/1.0"
        Title="DynamicDataDisplay Sample - Intensity Chart" WindowState="Maximized"
        Icon="{x:Static d3:D3IconHelper.DynamicDataDisplayWhiteIcon}">
    <Grid>
		<Grid.ColumnDefinitions>
			<ColumnDefinition Width="Auto"/>
			<ColumnDefinition Width="*"/>
		</Grid.ColumnDefinitions>
		<Grid.RowDefinitions>
			<RowDefinition Height="*"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>
		
        <d3:ChartPlotter Name="plotter" Grid.Row="0" Grid.Column="1" Visible="-4,-4,8,8">
			<d3:ViewportHostPanel>
				<Image Name="image" d3:ViewportPanel.ViewportBounds="-4,-4,8,8" Stretch="Fill"/>
			</d3:ViewportHostPanel>
			
			<d3:DraggablePoint Name="point" Position="0,0" PositionChanged="point_PositionChanged"/>
			<d3:VerticalLine Value="{Binding ElementName=point, Path=Position.X}" Stroke="Red"/>
			<d3:HorizontalLine Value="{Binding ElementName=point, Path=Position.Y}" Stroke="Red"/>
			
			<d3:CursorCoordinateGraph/>
			<d3:AxisCursorGraph/>
        </d3:ChartPlotter>
		
		<d3:ChartPlotter MainHorizontalAxisVisibility="Collapsed" MainVerticalAxisVisibility="Collapsed" Height="{Binding ElementName=plotter, Path=CentralGrid.ActualHeight}"
						 MinWidth="100" ViewportClipToBoundsEnlargeFactor="1" VerticalAlignment="Top"
						 Grid.Row="0" Grid.Column="0" LegendVisibility="Collapsed"
						 Name="sectionPlotter">
			<d3:ChartPlotter.DataTransform>
				<d3:SwapTransform/>
			</d3:ChartPlotter.DataTransform>
			
			<d3:LineGraph Name="verticalSectionChart"/>
		</d3:ChartPlotter>
		
		<d3:ChartPlotter MainHorizontalAxis="{x:Null}" MainVerticalAxis="{x:Null}" Width="{Binding ElementName=plotter, Path=CentralGrid.ActualWidth}"
						 MinHeight="100" ViewportClipToBoundsEnlargeFactor="1" HorizontalAlignment="Right"
						 Grid.Row="1" Grid.Column="1" LegendVisibility="Collapsed">
			<d3:LineGraph Name="horizontalSectionChart"/>
		</d3:ChartPlotter>
    </Grid>
</Window>
